/*
 *
num = 1000, name = zhangsan, score = 99.000000
 */
#include<stdio.h>
#include<string.h>

struct student
{
	int num;
	char name[16];
	float score;
};

int main(){
	struct student stu;
	struct student *pstu = &stu;

	//原方式，通过变量赋值
	/*
	stu.num = 1000;
	strcpy(stu.name, "zhangsan");
	stu.score = 99;
	*/

	//现方式：通过指针变量赋值
	pstu->num = 1000;
	strcpy(pstu -> name, "zhangsan");
	pstu->score = 99;
	printf("num = %d, name = %s, score = %f\n",stu.num, pstu->name, pstu->score);

	return 0;
}
